1. Field of the Invention
The present invention relates to an image processing apparatus, and more specifically to an image processing apparatus that performs pseudo half-tone processing, to an image processing method therefor, and to a recording medium (computer usable medium) for storing a program that performs such processing.
2. Description of the Related Art
Dithering methods used in copy machines, facsimiles, and similar devices for binary conversion of gray-scale images are well known. Conventional dithering methods use a threshold matrix composed of arbitrarily selected threshold values to convert a gray-scale image into a bi-level image that resembles gray-scale.
One such method allows a certain pattern, such as an xe2x80x9cAxe2x80x9d character pattern, to be rendered in the output image when dithering is performed in the course of scanning and reproducing of image. As shown in FIG. 8A of the accompanying drawings, a base matrix K and data for the xe2x80x9cAxe2x80x9d character pattern P1 are first provided, and a second matrix KP1 (shown in FIG. 8B) of 14 thresholds for the xe2x80x9cAxe2x80x9d character is derived. This is accomplished by extracting from the base matrix K the threshold values for only pixels corresponding to the pixels of the character pattern xe2x80x9cAxe2x80x9d. The 14 threshold values in the resulting extracted matrix KP1 are then re-indexed by a new set of thresholds (in this case from 1 to 14 from the smallest), yielding a final threshold matrix M1 (shown in FIG. 8C).
When this threshold matrix M1 for the xe2x80x9cAxe2x80x9d character pattern is then used to dither a uniform gray-scale image having image density of xe2x80x9c14xe2x80x9d, the xe2x80x9cAxe2x80x9d character pattern P1 is properly made to appear in the output image.
The problem, however, is that when a threshold matrix M1 that represents only the xe2x80x9cAxe2x80x9d character pattern P1 is used for the dithering, the xe2x80x9cAxe2x80x9d character pattern may only appear distinctly within the output image when the source image contains a very narrow range of gray levels. Specifically, in the current example, the xe2x80x9cAxe2x80x9d will only be completely reproduced in the output image (i.e., the pixels representing the xe2x80x9cAxe2x80x9d character pattern in the output image will all be black, and surrounding pixels will be white) when all the pixels of the source image have image density of xe2x80x9c14xe2x80x9d. In general, however, some pixels in the original character have image density less than xe2x80x9c14xe2x80x9d, and therefore, the xe2x80x9cAxe2x80x9d character pattern may not be completely and distinctly rendered in the output image, and it may be difficult to identify the pattern P1 when it is printed on a recording sheet.
It is thus an object of the present invention to provide an image processing apparatus capable of reliably reproducing an original image in an output image (on a recording sheet) when processing a source image having a wide range of gray-scale values.
Another object of the present invention is to provide an image processing method therefor.
Still another object of the present invention is to provide a recording medium for storing a program which performs such processing.
According to a first aspect of the present invention, there is provided an image processing apparatus for performing pseudo half-tone processing, that comprises a storage unit for storing a base matrix and data for font pattern relating to an original image, and a threshold matrix generating unit for generating a threshold matrix capable of rendering (reproducing) an original image having a wide range of gray-scale levels based on the base matrix and the font pattern data. This image processing apparatus can reproduce an original image on a recording sheet even if the original image has a wide range of gray-scale levels. The original image may be a character, symbol, mark, sentence, etc.
The storage unit may further store a threshold address table, and the threshold matrix generating unit may also refer to the threshold address table when it generates the threshold matrix. The threshold address table may contain address data arranged from lowest threshold value to highest. The threshold matrix obtained by using such threshold address table may be employed when reproducing an original image in an image density in proportion to the image density of the original image. Alternatively, the threshold address table may contain the address data arranged from highest threshold value to lowest. A threshold matrix obtained from such threshold address table may be used when printing an image having image density in inverse proportion to the image density of the original image.
According to a second aspect of the present invention, there is provided an image processing method for use in an image processing apparatus which performs pseudo half-tone processing, comprising the steps of initializing threshold values for a character pattern (original image), a shadow pattern and a background pattern using font pattern data, and reassigning the threshold values in the character pattern, the shadow pattern, and the background pattern based on a base matrix. This image processing method can enable an original image to be rendered in an output image even if the original image contains a wide range of gray-scale levels. The threshold values may be reassigned based on threshold addresses derived from the base matrix.
According to a third aspect of the present invention, there is provided another image processing method for use in an image processing apparatus which performs pseudo half-tone processing, comprising the step of initializing threshold values for an original image pattern (e.g., character pattern), its shadow pattern and background pattern, respectively, the step of sequentially reading out address data from a threshold address table, and the step of reallocating the threshold values of said patterns based on the data read from the threshold value address table. With this method, an original image is reliably rendered in an output image even when the original image contains multiple levels of gray.
According to a fourth aspect of the present invention, there is provided a program storage medium for a computer such that the computer is able to function as a module for storing a base matrix and font pattern data and another module for generating a threshold matrix that can reproduce an original image even if the original image contains a wide range of gray-scale levels (or image density), based on the base matrix and the font pattern data.